import request from "@/utils/request";
//统计
export function purchaseDemandTotal(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/total`,
    method: "post",
    data,
  });
}
//创建--废弃
// export function purchaseDemandCreate(data) {
//   return request({
//     url: `/v1/purchase-demand/develop-demand/create`,
//     method: "post",
//     data,
//     returnData: true
//   });
// }
export function purchaseDemandCreate(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/batch-create`,
    method: "post",
    data,
    returnData: true
  });
}
//编辑
export function purchaseDemandEdit(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/edit`,
    method: "post",
    data,
    returnData: true
  });
}
//列表
export function purchaseDemandList(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/list`,
    method: "post",
    data,
  });
}
//详情
export function purchaseDemandDetail(params) {
  return request({
    url: `/v1/purchase-demand/develop-demand/detail`,
    method: "get",
    params,
  });
}
//批量提交
export function purchaseDemandBatchSubmit(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/batch-submit`,
    method: "post",
    data,
  });
}
//计划接收
export function purchaseDemandBatchReceive(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/batch-receive`,
    method: "post",
    data,
  });
}
//批量作废
export function purchaseDemandBatchCancel(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/batch-cancel`,
    method: "post",
    data,
  });
}
//生成备料
export function purchaseDemandProcessPlan(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/process-plan`,
    method: "post",
    data,
  });
}
//生成备库需求单
export function purchaseDemandProcessDemand(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/process-demand`,
    method: "post",
    data,
  });
}
//添加计划人员配置
export function purchaseDemandSavePlan(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/save-plan`,
    method: "post",
    data,
  });
}
//计划人员配置列表
export function purchaseDemandPlanList(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/plan-list`,
    method: "post",
    data,
  });
}
//删除计划人员配置
export function purchaseDemandPlanDelete(params) {
  return request({
    url: `/v1/purchase-demand/develop-demand/delete-plan`,
    method: "get",
    params,
  });
}
//
export function purchaseDemandSetPlan(data) {
  return request({
    url: `/v1/purchase-demand/develop-demand/set-plan`,
    method: "post",
    data,
  });
}
  // 组合sku列表
export function getGoodsSku(data) {
  return request({
    baseURL: window.APP_GETEWAY.goods,
    url: '/v1/goods/sku/list',
    method: 'post',
    data,
  })
}
//反审
export function auditBack(data) {
  return request({
    url: '/v1/purchase-demand/develop-demand/audit-back',
    method: 'post',
    data,
  })
}

